//
//  MyStoreInformationViewController.m
//  GLGW_Shoping
//
//  Created by whx on 2018/12/10.
//  Copyright © 2018年 yang. All rights reserved.
//

#import "MyStoreInformationViewController.h"
#import "StoreInformationViewModel.h"
#import "MainTypesListViewController.h"
#import "MainAreaViewController.h"

@interface MyStoreInformationViewController ()
@property (nonatomic, strong) StoreInformationViewModel *viewModel;

@end

@implementation MyStoreInformationViewController
- (void)viewDidLoad {
    [super viewDidLoad];
    self.title = @"自由经理人店铺资料";
    [self addNavigationItemWithTitles:@[@"保存"] isLeft:NO target:self action:@selector(rightAction) tags:@[@122] theButTitColor:kColor_Rule_Yellow titFont:SYSTEMFONT(15)];
    self.viewModel = [[StoreInformationViewModel alloc] initWithViewToViewModel:self.groupedTableView theSuperView:self.view];
    kWeakSelf(self);
    self.viewModel.BlockSelectRow = ^(NSIndexPath *index) {
        [weakself seleRow];
    };
    self.viewModel.BlockMainType = ^{
        [weakself mainType];
    };
}

- (void)mainType
{
    MainTypesListViewController *vc = [MainTypesListViewController new];
    [self.navigationController pushViewController:vc animated:YES];
}

- (void)seleRow
{
    MainAreaViewController *vc = [MainAreaViewController new];
    [self.navigationController pushViewController:vc animated:YES];
}

- (void)rightAction
{
    [self.viewModel keepAll];
}

@end
